﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlaughterItem.Common.DBContext
{
    public class GetDbContextDesignTimeFactory : IDesignTimeDbContextFactory<GetEFDBContext>
    {
        public GetEFDBContext CreateDbContext(string[] args)
        {
            DbContextOptionsBuilder<GetEFDBContext> builder = new DbContextOptionsBuilder<GetEFDBContext>();
            builder.UseSqlServer("server=8.140.206.121;uid=sa;pwd=whq20050625.;database=GETSlaughterItemSQLServerNew");
            return new GetEFDBContext(builder.Options);


            //    //DbContextOptionsBuilder<GetEFDBContext> builder = new DbContextOptionsBuilder<GetEFDBContext>();
            //    //builder.UseSqlServer("server=10.223.4.24;uid=sa;pwd=123456;database=GETSlaughterItemSQLServerNew");
            //    
            //return new GetEFDBContext(builder.Options);
        }

    }
}
